<?php

use App\Http\Controllers\ContractController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\OrderController;
use Illuminate\Support\Facades\Route;


/**
 * 前台路由
 */


//地图
Route::get('map', function () {
    return view('map');
})->name("map");


//首页模板
Route::get('/', [HomeController::class, 'home'])->name('home');
Route::get('/about', [HomeController::class, 'about'])->name('about');
Route::get('category/{category}.html', [HomeController::class, 'category'])->name('category');
Route::get('content/{content}.html', [HomeController::class, 'content'])->name('content');

/**
 * =========栏目===============
 */


//联系我们
Route::get('/contract', [ContractController::class, 'contract'])->name('contract');


//服务预约
Route::resource('order', OrderController::class);

//联系我们
Route::get('/contract', [ContractController::class, 'contract'])->name('contract');


Route::get('{app}/{path?}/{route?}', function () {
    return view('app');
})->where('app', '(.*?)')->where('path', '(.*?)')->where('route', '(.*?)');


//后备路由
Route::fallback(function () {
    return view("app");
});
